import { Button } from "@tarojs/components";
import React from 'react'

import './ScanQrCodeButton.scss'

interface ScanQrCodeButtonProps {
  onClick: any
  name: String
}

export default class ScanQrCodeButton extends React.Component<ScanQrCodeButtonProps, any> {

  constructor(props) {
    super(props);
  }
  

  componentDidMount() {
    // this.props.onClick(this)
  }

  handleClick () {
    this.props.onClick()
  }

  render () {
    return (
      <Button className='scan-qr-button' onClick={this.handleClick.bind(this)}>
        { this.props.buttonText }
      </Button>
    )
  }
}

